<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>/*绝对定位*/
    .box{
        margin: 100px;
        padding: 50px ;
        border: 1px solid green;
        position: relative;
        
    
    }
    .p0{
        border: 1px  solid chocolate;
        margin: 40px;
        padding: 20px;
       
    }
        
        .c1{
            width: 100px;
            height: 100px;
            position: absolute;
            top: 20px;
            left: 20px;
            background-color: red;}
            .c2{
            
            width: 100px;
            height: 100px;
            background-color: blue;}
    </style>
</head>
<body>
    <div class="p0">
    <div class="box">
        <div class="c1"></div>
        <div class="c2"></div>
    </div></div>
</body>
</html>